﻿@model _1._8._2015_SHero_Auth.Models.SHerosViewModel
@{
    ViewBag.Title = "Home Page";
}

<div class="jumbotron">
    <h1>Super Heros</h1>
</div>

<div class="row">
    <div class="col-md-12">
        <table class="table table-striped table-bordered">
            <tr>
                <th>Name</th>
                <th>Origin</th>
                <th>Super Power</th>
                <th>Power Source</th>
                <th></th>
                <th></th>

            </tr>
            @foreach (var sh in Model.SHeros)
            {
                <tr>
                    <td>@sh.Name</td>
                    <td>@sh.Origin</td>
                    <td>@sh.SuperPower</td>
                    <td>@sh.PowerSource</td>
                    <td>@Html.ActionLink("Edit Super Hero", "UpdateSHero", new { id = @sh.SHeroId })</td>
                    <td>Delete Super Hero
                        <button type="button" class="close" aria-hidden="true">
                            @(Html.ActionLink("x", "DeleteSHero", new { id = @sh.SHeroId }))
                        </button>
                    </td>
                </tr>
            }

        </table>
    </div>

</div>
<div class="row">
    <div class="col-md-4"></div>
    <div class="col-md-4">
        <button class="btn btn-primary right" onclick="location.href='@Url.Action("CreateSHero", "Admin")';return false;">Create Super Hero</button>
    </div>
    <div class="col-md-4"></div>
</div>
